var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/xhpx";
const jdata = require('../json/kungfu/anran-zhang-action.json');
// console.log(jdata);return;

MongoClient.connect(url, function(err, db) {
    if (err) throw err;
    var dbo = db.db("xhpx");

    // 查
    dbo.collection("action").find({"sk_name":'anran-zhang-2'}).toArray(function(err, result) { // 返回集合中所有数据
        if (err) throw err;
        console.log(result);
        db.close();
    });

    // 增
    // dbo.collection("action").insertOne(jdata, function(err, res) {
    //     if (err) throw err;
    //     console.log("文档插入成功");
    //     db.close();
    // });
});